﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class ShopBrandApplysInfoConfig : EntityTypeConfiguration<ShopBrandApplysInfo>
    {
        public ShopBrandApplysInfoConfig()
        {
            ToTable("Himall_ShopBrandApplys");
            Property(item => item.BrandName).HasColumnType("varchar").HasMaxLength(50);
            Property(item => item.Logo).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.Description).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.AuthCertificate).HasColumnType("varchar").HasMaxLength(4000);
            Property(item => item.Remark).HasColumnType("varchar").HasMaxLength(1000);
            HasRequired(x => x.Himall_Brands).WithMany(x => x.Himall_ShopBrandApplys).HasForeignKey(x => x.BrandId);
            HasRequired(x => x.Himall_Shops).WithMany(x => x.Himall_ShopBrandApplys).HasForeignKey(x => x.ShopId);
        }
    }
}
